Skip to main content

Naming expirement (July 2024)

· 4 min read
Victor Kozub

Today was a great day, and I conducted an experiment to test how ideal the chosen ACPUL naming system is. The results surprised me because I thought there was room for improvement, but it seems it's already perfect.

I asked ChatGPT to give me the best naming options. The highest score was achieved by nodePropZOrderS(u0, sn0, -1);, which was quite expected based on this metric.

Request 10 names with dots

write 10 alternatives with short names of function node.prop.z.order.s(u0, sn0, -1);

Here are 10 alternatives with short names for the function node.prop.z.order.s(u0, sn0, -1);:

  1. n.p.z.o.s(u0, sn0, -1);
  2. nd.pr.z.o.s(u0, sn0, -1);
  3. npz.os(u0, sn0, -1);
  4. nprop.zos(u0, sn0, -1);
  5. node.pz.os(u0, sn0, -1);
  6. n.pzo.s(u0, sn0, -1);
  7. nd.pz.o.s(u0, sn0, -1);
  8. np.zorder.s(u0, sn0, -1);
  9. node.z.os(u0, sn0, -1);
  10. np.z.o.s(u0, sn0, -1);

Request 10 names without dots

merge and camelCase or _ also etc

Here are 10 alternatives with merged and camelCase or snake_case names for the function node.prop.z.order.s(u0, sn0, -1);:

  1. nodePropZOrderS(u0, sn0, -1);
  2. nPropZOrderS(u0, sn0, -1);
  3. npzOrderS(u0, sn0, -1);
  4. nodePZOrderS(u0, sn0, -1);
  5. npZOrderS(u0, sn0, -1);
  6. node_prop_z_order_s(u0, sn0, -1);
  7. n_prop_z_order_s(u0, sn0, -1);
  8. npz_order_s(u0, sn0, -1);
  9. node_pz_order_s(u0, sn0, -1);
  10. np_z_order_s(u0, sn0, -1);

Generate score

made score for length, reading, style for each variant and which score is better

Let's evaluate each variant based on three criteria: length, readability, and style. We'll assign a score from 1 to 5 for each criterion, where 5 is the best.

Criteria

  1. Length: Shorter is better.
  2. Readability: Easier to read and understand.
  3. Style: Consistency and clarity in naming.

Scoring

  • Length: 5 (very short), 4, 3 (moderate), 2, 1 (very long)
  • Readability: 5 (very readable), 4, 3 (moderate), 2, 1 (difficult to read)
  • Style: 5 (very stylish), 4, 3 (moderate), 2, 1 (poor style)

Variants and Scores

  1. nodePropZOrderS(u0, sn0, -1);

    • Length: 3
    • Readability: 4
    • Style: 5
    • Total: 12
  2. nPropZOrderS(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 4
    • Total: 11
  3. npzOrderS(u0, sn0, -1);

    • Length: 5
    • Readability: 2
    • Style: 3
    • Total: 10
  4. nodePZOrderS(u0, sn0, -1);

    • Length: 3
    • Readability: 4
    • Style: 4
    • Total: 11
  5. npZOrderS(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 4
    • Total: 11
  6. node_prop_z_order_s(u0, sn0, -1);

    • Length: 2
    • Readability: 5
    • Style: 3
    • Total: 10
  7. n_prop_z_order_s(u0, sn0, -1);

    • Length: 3
    • Readability: 4
    • Style: 3
    • Total: 10
  8. npz_order_s(u0, sn0, -1);

    • Length: 5
    • Readability: 2
    • Style: 2
    • Total: 9
  9. node_pz_order_s(u0, sn0, -1);

    • Length: 3
    • Readability: 4
    • Style: 3
    • Total: 10
  10. np_z_order_s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 3
    • Total: 10

Best Score

The variant nodePropZOrderS(u0, sn0, -1); scored the highest with a total of 12 points, making it the best choice based on length, readability, and style.

for previous variant also (with dots)

Sure, let's also evaluate the previous variants with dots using the same criteria: length, readability, and style.

Variants and Scores

  1. n.p.z.o.s(u0, sn0, -1);

    • Length: 5
    • Readability: 2
    • Style: 2
    • Total: 9
  2. nd.pr.z.o.s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 2
    • Total: 9
  3. npz.os(u0, sn0, -1);

    • Length: 5
    • Readability: 2
    • Style: 2
    • Total: 9
  4. nprop.zos(u0, sn0, -1);

    • Length: 3
    • Readability: 3
    • Style: 3
    • Total: 9
  5. node.pz.os(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 3
    • Total: 10
  6. n.pzo.s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 2
    • Total: 9
  7. nd.pz.o.s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 2
    • Total: 9
  8. np.zorder.s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 3
    • Total: 10
  9. node.z.os(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 3
    • Total: 10
  10. np.z.o.s(u0, sn0, -1);

    • Length: 4
    • Readability: 3
    • Style: 2
    • Total: 9

Best Score

The variants node.pz.os(u0, sn0, -1);, np.zorder.s(u0, sn0, -1);, and node.z.os(u0, sn0, -1); scored the highest with a total of 10 points each. These are the best choices based on length, readability, and style.